  
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spShippingStatusReportGetNextSalesOrder]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [spShippingStatusReportGetNextSalesOrder]
GO

	

CREATE PROCEDURE spShippingStatusReportGetNextSalesOrder
AS

SELECT ISNULL(MAX(SalesOrder), 0) + 1	
FROM
	[ShippingStatusReport] 


GO

	
 